/**
 * 控制流分析
 * */

function example() {
  let x: string | number | boolean
  x = Math.random() < 0.5
  // let x: boolean
  console.log(x)
  if (Math.random() < 0.5) {
    x = 'hello'
    // let x: string
    console.log(x)
  } else {
    x = 100
    // let x: number
    console.log(x)
  }
  return x
}
